package com.bz.controller;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bz.common.ConfigUtils;
import com.bz.common.ResponseDto;
import com.bz.service.IConfigService;

@RestController
@RequestMapping(value = "/admin/config")
public class ConfigController {

    @Autowired
    private IConfigService configService;

    @RequestMapping(value = "/load")
    public ResponseDto<String> load(Model model, HttpServletRequest request) {
        configService.loadConfig();
        return new ResponseDto<>("success");
    }
}
